package vn.elca.training.important_classes_excercise;

import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;


public class Question10 {
	enum DAY{WED("Wednesday"),SUN("Sunday"),MON("Monday"),TUE("Tuesday"),THU("Thurday"),FRI("Friday"),SAT("Saturday");
		String m_name;
		DAY(String name){
			m_name = name;
		}
	};
	public static void main(String[] args) {
		sortDates(Arrays.asList(new DAY[]{DAY.THU,DAY.SUN,DAY.SAT,DAY.MON, DAY.WED,DAY.TUE}));
	}
	public static void sortDates(List<DAY> dayList){
		//Set<DAY> set = new TreeSet<DAY>(dayList);
		List<DAY> set = new LinkedList<DAY>(dayList);        // Using LinkedList instead TreeSet to sort descending 
		//Collections.sort(set,Collections.reverseOrder());
		Collections.sort(set);
		for( DAY day : set){
			System.out.println(day);
		}
	}

}
